package com.kele.service.impl;

import com.kele.dao.OrderDao;
import com.kele.domain.Order;
import com.kele.service.OrderService;
import com.kele.utils.ResponseData;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * @author 赵奥林
 * @date 2021年06月12日 13:58
 * @Description
 */
@Service("ordersService")
public class OrderServiceImpl implements OrderService {

    @Resource
    private OrderDao orderDao;

    @Override
    public Integer insertOrder(Order order) {
        return orderDao.insertOrder(order);
    }

    @Override
    public List<Order> findAllOrders() {
        return orderDao.findAllOrders();
    }

    @Override
    public Integer deleteOrder(Integer order_id) {
        return orderDao.deleteOrder(order_id);
    }

    @Override
    public Integer updateOrderState(Order order) {
        return orderDao.updateOrderState(order);
    }


    @Override
    public Order queryOrderById(String order_id) {
        return orderDao.queryOrderById(order_id);
    }

    @Override
    public Order queryOrderByPayId(String order_payid) {
        return orderDao.queryOrderByPayId(order_payid);
    }
}
